package reflect;

import java.io.File;
import java.net.URISyntaxException;

public class Test4 {
    public static void main(String[] args) throws URISyntaxException, ClassNotFoundException {
        String packName = Test4.class.getPackage().getName();
        File dir = new File(
                Test4.class.getResource(".").toURI()
        );
        File[] subs = dir.listFiles(f -> f.getName().endsWith(".class"));
        for (File file : subs){
            String fileName = file.getName();
            System.out.println(fileName);
            String className = fileName.substring(0,fileName.indexOf("."));
            Class cls =Class.forName(packName + "."+ className);

        }
    }
}
